package com.ship.contract.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.contract.bean.ConResourceMemorandumPosition;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ConResourceMemorandumPositionMapper extends BaseMapper<ConResourceMemorandumPosition> {

    @Update("UPDATE con_resource_memorandum_position SET con_id = #{conId} WHERE file = #{file}")
    @Results({
            @Result(property = "conId", column = "con_id")
    })
    int updateConId(@Param("file") String file,@Param("conId") Long conId);

    @Select("SELECT filed_name, x1, x2, y1, y2, page,filed_value,old_name FROM con_resource_memorandum_position WHERE con_id = #{conId}")
    List<ConResourceMemorandumPosition> getFieldLocation(@Param("conId") Long conId);
}
